package com.dime.basic.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import com.ruoyi.common.core.utils.uuid.IdUtils;
import com.ruoyi.common.security.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.dime.basic.mapper.DimeBaseevaluationMapper;
import com.dime.basic.api.domain.DimeBaseevaluation;
import com.dime.basic.service.IDimeBaseevaluationService;

/**
 * 职业评价依据Service业务层处理
 * 
 * @author Tiny
 * @date 2023-10-23
 */
@Service
public class DimeBaseevaluationServiceImpl implements IDimeBaseevaluationService 
{
    @Autowired
    private DimeBaseevaluationMapper dimeBaseevaluationMapper;

    /**
     * 查询职业评价依据
     * 
     * @param id 职业评价依据主键
     * @return 职业评价依据
     */
    @Override
    public DimeBaseevaluation selectDimeBaseevaluationById(String id)
    {
        return dimeBaseevaluationMapper.selectDimeBaseevaluationById(id);
    }

    /**
     * 查询职业评价依据列表
     * 
     * @param dimeBaseevaluation 职业评价依据
     * @return 职业评价依据
     */
    @Override
    public List<DimeBaseevaluation> selectDimeBaseevaluationList(DimeBaseevaluation dimeBaseevaluation)
    {
        return dimeBaseevaluationMapper.selectDimeBaseevaluationList(dimeBaseevaluation);
    }

    /**
     * 新增职业评价依据
     * 
     * @param dimeBaseevaluation 职业评价依据
     * @return 结果
     */
    @Override
    public int insertDimeBaseevaluation(DimeBaseevaluation dimeBaseevaluation)
    {
        dimeBaseevaluation.setId(IdUtils.fastUUID());
        dimeBaseevaluation.setCreateTime(DateUtils.getNowDate());
        dimeBaseevaluation.setCreateBy(SecurityUtils.getUsername());
        return dimeBaseevaluationMapper.insertDimeBaseevaluation(dimeBaseevaluation);
    }

    /**
     * 修改职业评价依据
     * 
     * @param dimeBaseevaluation 职业评价依据
     * @return 结果
     */
    @Override
    public int updateDimeBaseevaluation(DimeBaseevaluation dimeBaseevaluation)
    {
        dimeBaseevaluation.setUpdateBy(SecurityUtils.getUsername());
        dimeBaseevaluation.setUpdateTime(DateUtils.getNowDate());
        return dimeBaseevaluationMapper.updateDimeBaseevaluation(dimeBaseevaluation);
    }

    /**
     * 批量删除职业评价依据
     * 
     * @param ids 需要删除的职业评价依据主键
     * @return 结果
     */
    @Override
    public int deleteDimeBaseevaluationByIds(String[] ids)
    {
        return dimeBaseevaluationMapper.deleteDimeBaseevaluationByIds(ids);
    }

    /**
     * 删除职业评价依据信息
     * 
     * @param id 职业评价依据主键
     * @return 结果
     */
    @Override
    public int deleteDimeBaseevaluationById(String id)
    {
        return dimeBaseevaluationMapper.deleteDimeBaseevaluationById(id);
    }
}
